﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Backend/Backend.Master"
    Inherits="System.Web.Mvc.ViewPage<IntroduceCompany.CompanyInformationView>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    CompanyInformationEdit
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<!-- Begin one column tab content window -->
    <div class="onecolumn">
        <div class="header">
            <span>Chỉnh Sửa Thông Tin Công Ty</span>
        </div>

        <br class="clear" />
        <div class="content">

        <div class="display-label error">
            <div class="errorcontent">
                <p><%= Html.ValidationMessage("NoticePage")%></p>
                <p><%= Html.ValidationMessageFor(model => model.CompanyName) %></p>
                <p><%= Html.ValidationMessageFor(model => model.Email) %></p>
                <p><%= Html.ValidationMessageFor(model => model.Fax) %></p>
                <p><%= Html.ValidationMessageFor(model => model.Phone) %></p>
                <p><%= Html.ValidationMessageFor(model => model.Address) %></p>
            </div>
        </div>

        <% using (Html.BeginForm("CompanyInformationEdit", "CompanyInformation"))
           {%>
        <div>
            <div class="editor_left">
                <label>
                    Ngôn ngữ:</label><br />
                <%= Html.DropDownList("LanguageID", (SelectList)ViewData["LaguageList"], new { @style = "width:300px;", onchange = "this.form.submit();" })%>
                <%= Html.HiddenFor(model => model.ComID) %>
            </div>
        </div>
        <%} %>

        <% using (Html.BeginForm("CompanyInformationEditSubmit" , "CompanyInformation", FormMethod.Post))
           {%>
            <%= Html.AntiForgeryToken(IntroduceCompany.Util.AntiKey.EditSalt)%>
            <%= Html.ValidationSummary(true) %>

            <div>
                <div class="editor_right" style="margin-left:30px;">
                    <label>Tên công ty:</label><br />
                    <%= Html.TextBoxFor(model => model.CompanyName, new {maxlength = "100", @style = "width:618px" })%>
                </div>
            </div><br class="clear"/><br />
        
            <div>
                <div class="editor_left">
                    <label>Email:</label><br />
                    <%= Html.TextBoxFor(model => model.Email, new { maxlength = "200" }) %>
                </div>
                <div class="editor_middle">
                    <label>Fax:</label><br />
                    <%= Html.TextBoxFor(model => model.Fax, new { maxlength = "50" })%>
                </div>
                <div class="editor_right">
                    <label>Điện thoại:</label><br />
                    <%= Html.TextBoxFor(model => model.Phone, new { maxlength = "30" })%>
                </div>
            </div><br class="clear"/><br />

            <div>
                <label>Địa chỉ:</label><br />
                <%= Html.TextBoxFor(model => model.Address, new { maxlength = "2000" })%>
            </div><br class="clear"/><br />
        
            <%= Html.HiddenFor(model => model.ComID) %>
            <%= Html.HiddenFor(model => model.LanguageID) %>
            <div>
                <div class="editor_left">
                    <input type="submit" value="Lưu" />
                    <a href="<%= Url.Action("CompanyInformationEdit","CompanyInformation") %>" class="buttonform">Làm Lại</a>
                </div> 
                <div class="editor_middle">
                    <label>Người chỉnh sửa cuối:</label>
                    <%= Model.FullName %>
                </div>
            </div><br class="clear"/><br />
        <% } %>
        </div>
    </div>    
</asp:Content>
